use axum::{routing::*, Router};
use axum::extract::Extension;

use crate::core::engine::OpsPanelCore;

mod execute;
mod batch;
mod state;
mod health;

pub fn create_router() -> Router {
    Router::new()
        .route("/api/execute", post(execute::execute_script_handler))
        .route("/api/batch", post(batch::execute_batch_handler))
        .route("/api/stats", get(health::get_stats_handler))
        .route("/api/state/:key", get(state::get_state_handler))
        .route("/api/state", post(state::set_state_handler))
        .route("/health", get(health::health_check_handler))
}